<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../../mofumui/mofumui.js" ></script>
	</head>
	<body>
		<script type="text/javascript">
			//设置JS路由
			mofum.setPrefix("../../");
			mofum.imports(["MFrame","MPTitled","MThemes"],function(MFrame,MPTitled,MThemes){
				
				var theme = MThemes.THEME_FLATTEN_00008;
				//创建框架
				var frame = new MFrame();
				
				//创建一个宽300，高100，背景为红色的面板。
				var panel = new MPTitled().setWidth(100);
				panel.setTitle("111");
				panel.putPanel("1 -----------");
				panel.putPanel("2 -----------");
				panel.putPanel("3 -----------");
				panel.putPanel("4 -----------");
				
				panel.getTitle().setBackground(theme.getColor(0));
				
				panel.getTitle().handle("click",function(){
					var visible = !(panel.getContent().isVisible());
					panel.getContent().setVisible(visible);
				
				});
				
				var panel2 = new MPTitled().setWidth(100).setBackground("#f00");
				panel2.setTitle("111");
				
				panel2.getTitle().handle("click",function(){
					var visible = !(panel2.getContent().isVisible());
					panel2.getContent().setVisible(visible);
				});
				panel2.getTitle().setBackground(theme.getColor(0));
				panel2.putPanel("xxxx");
				panel2.putPanel("xxxx");
				panel2.putPanel("xxxx");
				panel2.putPanel("xxxx");
				
				panel.putPanel(panel2);
				//设置文本
				frame.append(panel);
				
			});
			
		</script>
	</body>
</html>
